package com.hk.employeemanagementsystem.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.List;

/**
 * @author by 何坤
 * @Classname MenuEntity
 * @Description TODO
 * @Date 2019/12/9 16:26
 */
@TableName("tab_menu")
public class MenuEntity {
    @TableId(value = "menu_id", type = IdType.AUTO)
    private Integer id;

    @TableField(value = "menu_name")
    private String name;

    @TableField(value = "menu_path")
    private String path;

    @TableField(value = "menu_url")
    private String url;

    @TableField(value = "menu_component")
    private String component;

    @TableField(value = "menu_icon_class")
    private String icon;

    @TableField(value = "menu_parent_id")
    private Integer parentId;

    @TableField(value = "menu_enabled")
    private Boolean enabled;

    @TableField(exist = false)
    private MenuMetaEntity meta;

    @TableField(exist = false)
    private List<MenuEntity> childrenMenu;

    @TableField(exist = false)
    private List<RoleEntity> roles;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getComponent() {
        return component;
    }

    public void setComponent(String component) {
        this.component = component;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public MenuMetaEntity getMeta() {
        return meta;
    }

    public void setMeta(MenuMetaEntity meta) {
        this.meta = meta;
    }

    public Boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public List<MenuEntity> getChildrenMenu() {
        return childrenMenu;
    }

    public void setChildrenMenu(List<MenuEntity> childrenMenu) {
        this.childrenMenu = childrenMenu;
    }

    public List<RoleEntity> getRoles() {
        return roles;
    }

    public void setRoles(List<RoleEntity> roles) {
        this.roles = roles;
    }

    @Override
    public String toString() {
        return "MenuEntity{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", path='" + path + '\'' +
                ", url='" + url + '\'' +
                ", component='" + component + '\'' +
                ", icon='" + icon + '\'' +
                ", parentId=" + parentId +
                ", meta=" + meta +
                ", enabled=" + enabled +
                ", childrenMenu=" + childrenMenu +
                ", roles=" + roles +
                '}';
    }
}
